import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';
import AdminHome from '../Admin/AdminHome.vue';
import AdminLayout from '../Admin/AdminMenu.vue';
import LoginView from '../Login.vue';

import messages from '@/messages.vue'
import StudentLoginView from "@/Student/Student-LoginView.vue";
import SIdentify from '@/SIdentify.vue';
import Announcement from "@/Student/Announcement.vue";
import StudentFoget from "@/Student/Student-Foget.vue";
import StudentRegister from "@/Student/Student-Register.vue";
import ForgetPassWord from '../forgotPassword.vue';
import MobileView from '../Student/StudentMenu.vue';
import StudentPage1 from '../Student/StudentHome.vue';
import StudentPage2 from '../Student/Student-info.vue';
import StudentPage3 from '../Student/Student-request.vue';
import StudentPage4 from '../Student/Student-Progress.vue';
import StudentPage5 from '../Student/Student-appraise.vue';
import StudentPage6 from '../Student/Student-rqhistory.vue';

import AdminMenu from "@/Admin/AdminMenu.vue";
import Page1 from '../Admin/views/Page1.vue';
import Page2 from '../Admin/views/Page2.vue';
import Page3 from '../Admin/views/Page3.vue';
import Page16 from '../Admin/views/Page16.vue';
import Page4 from '../Admin/views/Page4.vue';
import Page5 from '../Admin/views/Page5.vue';
import Page6 from '../Admin/views/Page6.vue';
import Page7 from '../Admin/views/Page7.vue';
import Page8 from '../Admin/views/Page8.vue';
import Page9 from '../Admin/views/Page9.vue';
import Page10 from '../Admin/views/Page10.vue';
import Page11 from '../Admin/views/Page11.vue';
import Page12 from '../Admin/views/Page12.vue';
// import Page13 from '../Admin/views/Page13.vue';
import Page14 from '../Admin/views/Page14.vue';
import Page15 from '../Admin/views/Page15.vue';

import TechnicianLogin from "@/Repair/Technician-Login.vue";
import TechnicianView from '@/Repair/TechnicianMenu.vue';
import TechnicianPage1 from '@/Repair/Technician-home.vue';
import TechnicianPage2 from '@/Repair/Technician-info.vue';
import TechnicianPage3 from '@/Repair/Technician-arrange.vue';
import TechnicianPage4 from '@/Repair/Technician-records.vue';
import TechnicianPage5 from '@/Repair/Technician-warehouse.vue';
import TechnicianPage6 from '@/Repair/Technician-upload.vue';
import TechnicianPage7 from '@/Repair/Technician-signin.vue';
import WarehousePage1 from "@/Repair/Warehouse/Warehouse.vue";
import WarehousePage2 from "@/Repair/Warehouse/MaterialBuy.vue";

import LogiunTest from '../logintest.vue';

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView
  },
  {
    path: '/logintest',
    name: 'logintest',
    component: LogiunTest
  },
  {
    path: '/forget',
    name: 'forgetPassword',
    component: ForgetPassWord
  },
  {
    path: '/student',
    name: 'student',
    component: StudentLoginView
  },
  {
    path: '/messages',
    name: 'messages',
    component: messages
  },
  {
    path: '/announcement',
    name: 'announcement',
    component: Announcement
  },
  {
    path: '/student-forget',
    name: 'studentForget',
    component: StudentFoget
  },
  {
    path: '/student-register',
    name: 'studentRegister',
    component: StudentRegister
  },
  {
    path: '/mobile',
    name: 'mobile',
    component: MobileView
  },
  {
    path: '/home',
    name: 'studentHome',
    component: StudentPage1
  },
  {
    path: '/personal-center',
    name: 'studentPersonalCenter',
    component: StudentPage2
  },
  {
    path: '/repair-request',
    name: 'studentRepairRequest',
    component: StudentPage3
  },
  {
    path: '/repair-progress',
    name: 'studentRepairProgress',
    component: StudentPage4
  },
  {
    path: '/service-evaluation',
    name: 'studentServiceEvaluation',
    component: StudentPage5
  },
  {
    path: '/fault-report',
    name: 'studentFaultReport',
    component: StudentPage6
  },
  {
    path: '/technician',
    name: 'technician',
    component: TechnicianView
  },
  {
    path: '/technician-login',
    name: 'technicianLogin',
    component: TechnicianLogin
  },
  {
    path: '/technician/home',
    name: 'technicianHome',
    component: TechnicianPage1
  },
  {
    path: '/technician/personal-center',
    name: 'technicianPersonalCenter',
    component: TechnicianPage2
  },
  {
    path: '/technician/task-schedule',
    name: 'technicianTaskSchedule',
    component: TechnicianPage3
  },
  {
    path: '/technician/repair-records',
    name: 'technicianRepairRecords',
    component: TechnicianPage4
  },
  {
    path: '/technician/warehouse',
    name: 'technicianWarehouse',
    component: TechnicianPage5
  },
  {
    path: '/technician/warehouse/wlck',
    name: 'warehouse',
    component: WarehousePage1
  },
  {
    path: '/technician/warehouse/buy',
    name: 'materialBuy',
    component: WarehousePage2
  },
  {
    path: '/technician/upload',
    name: 'technicianUpload',
    component: TechnicianPage6
  },
  {
    path: '/technician/signin',
    name: 'technicianSignin',
    component: TechnicianPage7,
  },
  {
    path: '/admin',
    component: AdminLayout,
    children: [
      {
        path: '',
        name: 'adminHome',
        component: AdminHome
      },

      {
        path: 'page16',
        name: 'adminPage16',
        component: Page16
      },
      {
        path: 'page1',
        name: 'adminPage1',
        component: Page1
      },
      {
        path: 'page2',
        name: 'adminPage2',
        component: Page2
      },
      {
        path: 'page3',
        name: 'adminPage3',
        component: Page3
      },
      {
        path: 'page4',
        name: 'adminPage4',
        component: Page4
      },
      {
        path: 'page5',
        name: 'adminPage5',
        component: Page5
      },
      {
        path: 'page6',
        name: 'adminPage6',
        component: Page6
      },
      {
        path: 'page7',
        name: 'adminPage7',
        component: Page7
      },
      {
        path: 'page8',
        name: 'adminPage8',
        component: Page8
      },
      {
        path: 'page9',
        name: 'adminPage9',
        component: Page9
      },
      {
        path: 'page10',
        name: 'adminPage10',
        component: Page10
      },
      {
        path: 'page11',
        name: 'adminPage11',
        component: Page11
      },
      {
        path: 'page12',
        name: 'adminPage12',
        component: Page12
      },
      // {
      //   path: 'page13',
      //   name: 'adminPage13',
      //   component: Page13
      // },
      {
        path: 'page14',
        name: 'adminPage14',
        component: Page14
      },
      {
        path: 'page15',
        name: 'adminPage15',
        component: Page15
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router;
